<template id="Past_members">
    <div class="try_m">
        <div class="Past_members_top">
            <img src="../image/blue_da.png" alt="" @click="get_tui()">
            <h4>往期试吃</h4>
        </div>
        <!--新版的试吃商品列表-->
         <div class="try_list">
             <div class="try_bu_mmg" v-for="sel in data">
                 <div class="try_li_st">
                     <div class="try_x_m"><img class="img_l1"  :src="sel.thumb" alt="" ></div>
                     <div class="try_x_right">
                         <h2 >{{sel.name}}</h2>
                         <p >{{sel.brief}}</p>
                         <div class="try_Select_price">
                            <span>
                                <strong>¥{{sel.shop_price}}</strong>
                                <time v-if="sel.goods_share">/{{sel.goods_share}}</time>
                            </span>
                             <span @click="get_t_detail(sel.trial_id)">查看详情</span>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
    </div>
</template>
<script>
    export default{
        name: 'Past_members',
        data() {
            return {
                data:[],
            }
        },
        mounted:function () {
           let H=$(window).height();
           $('.try_m').height(H);

             
           //获取往期试吃
           let info  = [];
           info['c'] = 'Member';
           info['m'] = 'trial_user_old';
           this.GLOBAL.getApi(this,info);


        },
        methods:{
            get_t_detail:function(id){
                this.$router.push('/try_detail?id='+id);
            },
            get_tui:function(){
                window.history.go(-1);
            }
        },

    };

</script>
<style>

    /*文案说说明*/
     .try_list .try_bu_mmg:last-of-type{
         border-bottom:0;
     }
     .try_bu_mmg{
         height:1.95rem;
         width:100%;
         border-bottom:0.01rem solid #f0f0f0;
         padding-top:0.34rem;
     }
     .try_li_st{
         height:1.95rem;
         width:5.95rem;
         margin:0 auto;
         display:flex;
         /*   flex-wrap: wrap;*/
         justify-content:flex-start;
         /*  border-bottom:0.01rem solid #f0f0f0;*/
     }
     .try_Select_price{
         height:0.68rem;
         position:relative;
         top:0;
     }
     .try_Select_price span:nth-of-type(2){
         display:block;
         height:0.42rem;
         width:1.34rem;
         position:absolute;
         color:#ffffff;
         font-size:0.28rem;
         line-height:0.42rem;
         text-align:center;
         border-radius:0.2rem;
         background: -webkit-linear-gradient(left, #7cceff , #2fb0fc); /* Safari 5.1 - 6.0 */
         background: -o-linear-gradient(right, #7cceff, #2fb0fc); /* Opera 11.1 - 12.0 */
         background: -moz-linear-gradient(right,  #7cceff, #2fb0fc); /* Firefox 3.6 - 15 */
         background: linear-gradient(to right, #7cceff, #2fb0fc); /* 标准的语法（必须放在最后） */
         top:0.1rem;
         right:0;

     }
     .try_Select_price span:nth-of-type(1){
         display:block;
         color:#fc1dac;
         font-size:0.18rem;
         width:2rem;
         height:0.68rem;
         line-height:0.68rem;
     }
     .try_Select_price strong{
         font-size:0.24rem;
     }
    /* .try_Select_price img{
         display:block;
         position:absolute;
         top: -0.08rem;
         right:0.2rem;
         height:0.6rem;
         width:0.6rem;
     }*/
     .try_x_m{
         /* flex:1;*/
         height:1.95rem;
         width:2.12rem;
     }
     .try_x_m img{
         /* display:block;*/
         width:1.66rem;
         height:1.66rem;
         border-radius:50%;
         margin:0 auto;
     }
     .try_x_right{
         height:1.75rem;
         width:3.84rem;
         /* flex: 1;*/
         padding-top:0.2rem;
     }
     .try_x_right h2{
         height:0.42rem;
         color:#4a4a4a;
         font-size:0.28rem;
         line-height:0.25rem;
         font-weight:normal;
     }
     .try_x_right p{
         height:0.35rem;
         color:#bababa;
         font-size:0.19rem;
         line-height:0.19rem;
     }
     .try_list{
         min-height:2.3rem;
         width:100%;
     }
    /*试吃商品列表*/
    .Past_members_top{
        height:0.74rem;
        width:100%;
        border-bottom:1px solid #f0f0f0;
        position:relative;
        background:#ffffff;
    }
    .Past_members_top img{
        height:0.36rem;
        width:0.36rem;
        display:block;
        position:absolute;
        left:0.25rem;
        top:0.2rem;
    }
    .Past_members_top h4{
        height:0.74rem;
        color:#2eaffc;
        font-size:0.3rem;
        line-height:0.74rem;
        text-align:center;
        font-weight:normal;
    }
</style>
